import java.io.*;
import java.net.*;


public class gui_client {

	public static Socket socket_communication;

	
	public static void main(String[] args) throws IOException 
	{
		 socket_communication = new Socket(InetAddress.getLocalHost(), 8081);
		 BufferedReader br = new BufferedReader(new InputStreamReader(socket_communication.getInputStream()));
		 PrintWriter pw = new PrintWriter(socket_communication.getOutputStream(), true);
		 pw.println("Salut Serveur");
		 
		 InputStream s1In = socket_communication.getInputStream();
		 DataInputStream dis = new DataInputStream(s1In);
		 String st = new String (dis.readUTF());
		 System.out.println(st);
		 // When done, just close the connection and exit
		 dis.close();
		 s1In.close();
		 socket_communication.close();
	}
	
}
